{include app:admin.inc.header}
<!--tmpl-resource-->
{include app:admin.inc.top}


<div class="container-fluid content-body">
	<div class="main">
		<!-- left side start-->

		<section class="left-section">
			<dl id="leftNav" data-type="message">
				<dt><i class="glyphicon glyphicon-plus"></i> 信息管理</dt>
				{if in_case_array('admin/notice',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/notice/index}">公告管理</a></dd>
				{/if}
				{if in_case_array('admin/information',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/information/index}">资讯管理</a></dd>
				{/if}
				{if in_case_array('admin/singlepage',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/singlepage/index}">单页管理</a></dd>
				{/if}
				{if in_case_array('admin/brand',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/brand/index}">特约品牌</a></dd>
				{/if}
				{if in_case_array('admin/adPlace',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/adPlace/index}">广告位管理</a></dd>
				{/if}
				{if in_case_array('admin/ad',$priv) || empty($priv)}
				<dd><a class="mb active" href="{url /admin/ad/index}">广告管理</a></dd>
				{/if}
			</dl>
		</section>

		<!-- left side end-->


		<!-- main content start-->
		<section class="right-section" id="right-section">
			{include admin.inc.bread}
			<h2 class="header">广告类型列表</h2>
			<!-- start of inner-frame -->
			<div class="inner-iframe">

				<div class="inner-container">
					<form class="form-inline search-form" role="form">
						<nav class="inline-form">
							<a class="btnlg mb" href="{$add_url}"><i class="css-add"></i>添加广告类型</a>
							<div class="r">
								<div class="form-group">
									<div class="input-group">
										<div class="input-group-addon">

										</div>
										<input type="text" class="form-control input-sm" maxlength="50" placeholder="" name="s_name" value="{$s_name}">
									</div>
								</div>
								<input type="hidden" name="order" value="{$order}">
								<button type="submit" class="btnlg mb">搜索</button>
								<input type="hidden" name="pagesize" value="{$pagesize}" >
							</div>
						</nav>

					</form>
					<form id="J_List_Form">
						<div class="table-responsive">
							<table id="J_ListTable" class="table  table-hover  table-striped">
								<!--tmpl-listtable-->

								<!-- listblock -->
								<thead>
									<tr>
										<th width="20">
											<label class="css-checkbox">
												<input type="checkbox" class="check-all">
												<span></span>
											</label>
										</th>
										<!--tmpl-fieldheaders-->
								
										<th><!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="name ASC"}name DESC{else}name ASC{/if}' class='fa ofield {if $order=="name ASC"}fa-chevron-up{elseif $order=="name DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>上级分类<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="parent_id ASC"}parent_id DESC{else}parent_id ASC{/if}' class='fa ofield {if $order=="parent_id ASC"}fa-chevron-up{elseif $order=="parent_id DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>分类描述<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="summary ASC"}summary DESC{else}summary ASC{/if}' class='fa ofield {if $order=="summary ASC"}fa-chevron-up{elseif $order=="summary DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th><!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="manager_id ASC"}manager_id DESC{else}manager_id ASC{/if}' class='fa ofield {if $order=="manager_id ASC"}fa-chevron-up{elseif $order=="manager_id DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>AppId<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="app_id ASC"}app_id DESC{else}app_id ASC{/if}' class='fa ofield {if $order=="app_id ASC"}fa-chevron-up{elseif $order=="app_id DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
								
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
								{if empty($items)}
								<tr>
									<td style="text-align:center;" colspan="3" class="empty-table-td">{$emptyRecord}</td>
								</tr>
								{/if}
								{loop $items $value}
								<tr>
									<td>
										<label class="css-checkbox">
											<input type="checkbox"  name="ids[]" value="{$value[id]}">
											<span></span>
										</label>
									</td>
									<!--tmpl-fieldlist-->
								
									<td>{$value[name]}</td>
									<td>{$value[information_ad_cate_id]}</td>
									<td>{$value[summary]}</td>
									<td>{$value[admin_manager_id]}</td>
									<td>{$value[app_id]}</td>
								
									<td>
										<!--tmpl-listbtn-->
								
										<!-- listbtnedit -->
										{if in_case_array('admin/adcate/edit',$priv) || empty($priv)}
										<a href="{$edit_url}?id={$value[id]}" class="btnsm-primary">编辑</a>
										{/if}
										
										<!-- listbtndelete -->
										{if in_case_array('admin/adcate/delete',$priv) || empty($priv)}
										<a href="{$delete_url}?id={$value[id]}" class="btnsm-danger item-remove">删除</a>
										{/if}
										
								
									</td>
								</tr>
								{/loop}
								

							</table>

						</div>
						
					</form>
					<div class="text-right">
						{$pagemenu}
					</div>

				</div>
			</div>
		</section>
	</div>
</div>

<!--footer section start-->
{include admin.inc.footer}
<!--footer section end-->

<!--tmpl-script-->

<!-- template -->
<script id="editpanel" type="text/html">
	<div>
		<form id="editpanel-form" class="form-horizontal">
			<div class="row">&nbsp</div>
			<!--tmpl-fieldlist-->

			<!-- input -->
			<div class="form-group">
				<label > </label>
				<input  dtype="" class="form-control" maxlength="50" name="data[name]" placeholder="" required cname="" value="{[name]}" />
			</div>
			<p class="help-block"></p>
			
			<!-- textarea -->
			<div class="form-group">
				<label>分类描述</label>
				<textarea class="form-control" maxlength="255" name="data[summary]" placeholder="分类描述" required cname="分类描述">{[summary]}</textarea>
			</div>
			<p class="help-block"></p>
			

			<!--tmpl-assocfields-->
		</form>
	</div>
</script>

<!-- pagescript -->
<script type="text/javascript">
	seajs.use("admin/information_ad_cateindex",function (parameter){
		
		/**--tmpl-templatejavascript--**/
		
		<!--tmpl-templatejavascript-->
		parameter.detailUrl="{$detail_url}";
		parameter.deleteUrl="{$delete_url}";
		parameter.editUrl="{$do_edit_url}";
		parameter.upload_url="{$upload_url}";
		parameter.image_search_url="{$image_search_url}";
		parameter.image_list_url="{$image_list_url}";
		
		parameter.init();		
	});
</script>


<script id="assocpage" type="text/html">
<div class="text-right">
	<ul class="pagination blog-pagination">
		<li><a class="assoc-page" data-page="{[prev]}" href="javascript:void(0);">上一页</a></li> 
		{[loop pages page]}

		<li {[if curr == page]}class="active"{[/if]}><a class="assoc-page" data-page="{[page]}"  href="javascript:void(0)">{[page]}</a></li> 

		{[/loop]}
		<li><a class="assoc-page" href="javascript:void(0);" data-page="{[nexts]}">下一页</a></li> 
	</ul>	
</div>
</script>
</body>
</html>
